<?php
    @session_start();
     if (!isset($_SESSION['id'])){
        header('location:submit/logout.php');
    }
    if (isset($_SESSION['id'])) {
        include("class/mysql.class.php");
        include("class/requete.php");
        require_once ("submit/Articles/get_list_article.php");
    }
    else{
        header('location:submit/logout.php');
    }    
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
        <title>Gestion de Stock interclé</title>
        <!-- Bootstrap -->
        <link href="bootstrap/css/bootstrap.css" rel="stylesheet" media="screen">
        <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
        <link href="bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
        <link href="vendors/styles.css" rel="stylesheet" media="screen">
        <link href="vendors/datatables/css/DT_bootstrap.css" rel="stylesheet" media="screen">
        <link rel="stylesheet" href="vendors/validationengine/css/validationEngine.jquery.css">
        <link rel="stylesheet" href="vendors/bootstrap-fileupload.min.css">
        <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="vendors/flot/excanvas.min.js"></script><![endif]-->
        <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
            <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <!--/.fluid-container-->
        
        <link href="vendors/datepicker.css" rel="stylesheet" media="screen">
        <link href="vendors/uniform.default.css" rel="stylesheet" media="screen">
        <link href="vendors/chosen.min.css" rel="stylesheet" media="screen">
		<!--/.fluid-container-->
        <link href="vendors/wysiwyg/bootstrap-wysihtml5.css" rel="stylesheet" media="screen">

        <script src="vendors/modernizr-2.6.2-respond-1.1.0.min.js"></script>
        
       <!--script print-->

       <script language="javascript" type="text/javascript">
        function printDiv(divID) {
            //Get the HTML of div
            var divElements = document.getElementById(divID).innerHTML;
            //Get the HTML of whole page
            var oldPage = document.body.innerHTML;

            //Reset the page's HTML with div's HTML only
            document.body.innerHTML = 
              "<html><head><title></title></head><body>" + 
              divElements + "</body>";

            //Print Page
            window.print();

            //Restore orignal HTML
            document.body.innerHTML = oldPage;

          
        }
    </script>

			          
			<!--calendar-->
			
<link rel="stylesheet" href="vendors/jquery-ui.css" />
<script src="vendors/jquery-1.9.1.js"></script>
<script src="vendors/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />

<script>
$(document).ready(function(){
    $("#datepicker").datepicker({dateFormat: 'dd/mm/yy'});    
})


$(function() {
$("#datepicker").datepicker({dateFormat: 'dd-mm-yy'});
});


$(function() {
$("#datepickers").datepicker({dateFormat: 'dd-mm-yy'});
});

$(function() {
$("#txtFromDate").datepicker({
        dateFormat: 'dd/mm/yy',
        numberOfMonths: 1,
        onSelect: function(selected) {
          $("#txtToDate").datepicker("option","minDate", selected)
        }
    });

    $("#txtToDate").datepicker({ 
        dateFormat: 'mm/dd/yy',
        numberOfMonths: 1,
        onSelect: function(selected) {
           $("#txtFromDate").datepicker("option","maxDate", selected)
        }
    });  
});
</script>




 


 </head>
    
    <body>
    <!-- / navbar -->
    <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container-fluid">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span>
                     <span class="icon-bar"></span>
                     <span class="icon-bar"></span>
                    </a>
                    <a class="brand" href="list_article.php">Gestion de Stock</a>
                    <div class="nav-collapse collapse">
                        <ul class="nav pull-right">
                        	<li class="dropdown"><a class="hidden-phone visible-tablet visible-desktop" href="javascript:history.back()" style="padding: 0px;"><button class="btn"><i class="icon-step-backward"></i></button></a></li>
                            <li class="dropdown">
                                <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown"> <i class="icon-user"></i> <?php echo $user['email_login']; ?> <i class="caret"></i>
                                </a>
                                <ul class="dropdown-menu">
                                	<?php
                        
									if($user['account_login']=="admin"){
									echo'
                                    <li>
                                        <a tabindex="-1" href="user.php">Profile</a>
                                    </li>
                                    <li class="divider"></li>
                                    ';
									}
                                    ?>
                                    <li>
                                        <a tabindex="-1" href="submit/logout.php">Déconnexion</a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                        
						
                        <ul class="nav">
                            <li class="active">
                                <a href="list_article.php">Accueil</a>
                            </li>
                            <li class="dropdown">
                                <a href="#" data-toggle="dropdown" class="dropdown-toggle">Gestion et Paramètres <b class="caret"></b>

                                </a>
                                <ul class="dropdown-menu" id="menu1">
                                    <li>
                                    	<?php                        
										if($user['account_login']=="admin"){
										echo'
                                        <a href="list_fournisseurs.php">Fournisseurs <i class="icon-arrow-right"></i></a>
                                       	<a href="list_unite.php">Unité de Vente</a>
									    <a href="list_type_articles.php">Types </a>';
										} ?>
                                        <a href="list_emplacement.php">Emplacements de stockage </i></a>
                                        <?php                        
										if($user['account_login']=="admin"){
										echo'
										
                                    </li>
                                    <li>
                                            <a href="list_stock_type.php">Unité stockage</a>
                                            <a href="list_monnaie.php">Monnaie </a>
                                   </li>                                    
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">Utilisateurs <i class="caret"></i>

                                </a>
                                <ul class="dropdown-menu">
                                    
                                    <li>
                                        <a tabindex="-1" href="user.php">Liste utilisateurs</a>
                                    </li>
                                    <li>
                                        <a tabindex="-1" href="log.php">Journal de log</a>
                                    </li>
                                </ul>
                            </li>
                        </ul>';
							}
								?>
                    </div>
                    <!--/.nav-collapse -->
                </div>
            </div>
        </div>